namespace Lzfy_His_Service.Models
{
    /// <summary>
    /// 退费任务工作量数据模型
    /// </summary>
    public class RefundTaskWorkload
    {
        /// <summary>
        /// 用户姓名
        /// </summary>
        public string fullName { get; set; } = string.Empty;

        /// <summary>
        /// 用户名
        /// </summary>
        public string username { get; set; } = string.Empty;

        /// <summary>
        /// 任务数量（来自uum_user表）
        /// </summary>
        public int TaskAmount { get; set; }

        /// <summary>
        /// 已接收任务量
        /// </summary>
        public int TaskReceived { get; set; }

        /// <summary>
        /// 已记录结果任务量
        /// </summary>
        public int ResultRecorded { get; set; }

        /// <summary>
        /// 已拨打电话任务量
        /// </summary>
        public int CallAmount { get; set; }

        /// <summary>
        /// 完成率（已记录结果/已接收任务）
        /// </summary>
        public decimal CompletionRate => TaskAmount > 0 ? (decimal)ResultRecorded / TaskAmount * 100 : 0;

        /// <summary>
        /// 拨打率（已记录结果数/已拨电话数）
        /// </summary>
        public decimal CallRate => CallAmount > 0 ?  ResultRecorded / (decimal)CallAmount* 100 : 0;
    }
}